<template>
    <div>
        <ul>
            <template v-if="store.getList.length > 0">
                <li v-for="item in store.getList" :key="item.pid">
                    {{ item.pid }} -- {{ item.ptime }} -- {{ item.price }} -- {{ item.paddr }}
                </li>
            </template>
            <template v-else="store.getList.length == 0">
                暂无数据
            </template>
        </ul>
    </div>
</template>

<script setup>
import useStore from './store';

import {storeToRefs} from 'pinia'

import {onMounted} from 'vue'

const store = useStore()

onMounted(()=>{
    store.$patch(state=>{
        console.log(state);
        state.list = [...state.originList]
    })
})

</script>

<style lang="scss" scoped>

</style>